package half;

import java.lang.reflect.Array;
import java.util.Arrays;

public class Order {
    //顺序排序将arr[21,32,12,45,567]按照从小到大的顺序排列
    public static void main(String[] args) {
        int[] arr={21,32,11,45,567};
        for (int i = 0; i < arr.length-1; i++) {
            for (int i1 = i+1; i1 < arr.length; i1++) {
                if (arr[i]<arr[i1]) {
                    int temp=arr[i1];
                    arr[i1]=arr[i];
                    arr[i]=arr[i1];

                }


            }


        }
        System.out.println(Arrays.toString(arr));
    }
}
